<template>
  <div>
    <div>
      <setHeader title="设置"  @done="gotobtn()"></setHeader>
    </div>
    <div style="position: absolute;width: 100%;top: 1rem;">
       <mt-field label="用户名" placeholder="请输入用户名" v-model="username"></mt-field>
       <mt-field label="用户名" placeholder="请输入用户名" v-model="username"></mt-field>
       <mt-field label="用户名" placeholder="请输入用户名" v-model="username"></mt-field>
       <mt-field label="用户名" placeholder="请输入用户名" v-model="username"></mt-field>
    </div>
  </div>
</template>

<script>
import setHeader from '../public/setHeader.vue';
  export default {
    data() {
      return {
      	headerTitle:'编辑',
        logining: true,
        ruleForm2: {
          username:'', 
          password:'',
        },
        userInfo:'',
        rules2: {
          account: [
            { required: true, message: '请输入账号', trigger: 'blur' },
            //{ validator: validaePass }
          ],
          checkPass: [
            { required: true, message: '请输入密码', trigger: 'blur' },
            //{ validator: validaePass2 }
          ]
        },
        checked: true,
        userImgHeight:'',
        userInfo:''
      };
    },
    components: {
      setHeader
    },
    created() {
        let that = this;
        that.userInfo = window.localStorage.getItem('userInfo');
        that.userInfo = JSON.parse(that.userInfo);
    },
     mounted() {
    //   let that = this;
    //   var a = Promise.resolve(this.getUserInfo())
    //   a.then(
    //   function (result) { 
    //         console.log(result);
    //         that.userInfo = result;
    // })

    //   console.log(that.userInfo);

    },
    methods: {
      //完成
      carryout:function(){
        this.$router.push({path:'/userCenter'});
      },
     outlogin:function(){
        localStorage.removeItem('access_token');
        this.$router.push({path:'/'});
      },


    }
  }

</script>
<style >
@import '../common/css/userCenter.css'

.SettingButton {
    position: absolute;
    width: 100%;
    top: 14rem;
}
</style>
